home *** CD-ROM | disk | FTP | other *** search
- package Local.Game.Thing
- {
- import Local.Game.World.*;
- import Local.Game.World.Map.*;
- import Local.Game.World.Map.Cell.*;
- import Local.Math.*;
- import STC9.System.*;
- import flash.display.*;
- import flash.events.*;
- import flash.geom.*;
-
- public class CStrikeArtillery extends CStrike
- {
-
-
- public var mWaitCount:int;
-
- public var mShellCount:int;
-
- public var mShellSpread:Number = 200;
-
- public var mTargetPosition:CPosition;
-
- public function CStrikeArtillery(param1:*)
- {
- mShellSpread = 200;
- super(new CPosition(0,-10));
- mType = "strikeartillery";
- mShellCount = 50;
- Process = Process_Normal;
- mTargetPosition = (param1 is CPosition ? param1 : param1.mPosition).Clone();
- IncrementFired();
- mShowOnMap = true;
- }
-
- public function Process_Normal() : void
- {
- var _loc1_:*;
- §§push((_loc1_ = §§findproperty(mWaitCount)).mWaitCount);
- if(true)
- {
- var _loc2_:*;
- §§push(_loc2_ = §§pop() - 1);
- if(true)
- {
- _loc1_.mWaitCount = _loc2_;
- }
- }
- if(§§pop() < 0)
- {
- §§push(_loc2_ = (_loc1_ = §§findproperty(mShellCount)).mShellCount - 1);
- if(true)
- {
- _loc1_.mShellCount = _loc2_;
- }
- if(§§pop() < 0)
- {
- DispatchDispose();
- }
- mWaitCount = SECONDS / 5;
- AddThing(new CShotArtilleryShell(new CPosition(mTargetPosition.x + Math.random() * mShellSpread - mShellSpread * 0.5,mLandscape.GetAltitude(mTargetPosition.x)),-1000));
- }
- Process_Children();
- }
- }
- }
-